import request from '@/utils/request'

export default {
    findAll:function () {
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroups',
            method:'get'
        })
    },
    add:function (resourceGroup) {
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroup',
            method:'post',
            data:resourceGroup
        })
    },
    edit:function (resourceGroup) {
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroup',
            method:'put',
            data:resourceGroup
        })
    },
    delete:function (resourceGroupId) {
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroup/'+resourceGroupId,
            method:'delete',
        })
    },
    findById:function (resourceGroupId) {
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroup/'+resourceGroupId,
            method:'get'
        })
    },
    //find all 携带资源信息
    findAllCarryResource:function(){
        return request({
            url:'/hnister-security-service/rest/pt/resourceGroups/@/for=carryResource',
            method:'get'
        })
    }

}

